package com.team.runsfast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author fxy
 * @date 2022/9/24
 */
@Data
@NoArgsConstructor
@TableName("t_foods")
public class Food {
    @TableId(type = IdType.AUTO)
    private Long id;
    //1.上架 2.下架
    private Integer flag;
    //店铺id
    private Long sid;
    //菜品名称
    private String title;
    //菜品类型（1. 汉堡披萨  2.便当快餐  3.奶茶饮品 4.地方菜 5.米粥 6.烧烤 7.西餐）
    private Integer tag;
    private Double orginprice;
    private Double currentprice;
    //图片
    private String imgurl;
    //菜品描述
    private String info;
    //
    private Integer num;
    //打包费
    private Double packprice;
    private Date ctime;

    public Food(Long sid, String title, Integer tag, Double orginprice, Double currentprice, String imgurl, String info, Double packprice) {
        this.flag = 1;
        this.ctime = new Date();
        this.sid = sid;
        this.title = title;
        this.tag = tag;
        this.orginprice = orginprice;
        this.currentprice = currentprice;
        this.imgurl = imgurl;
        this.info = info;
        this.packprice = packprice;
    }
}
